class HTHBean {
  int code;
  Data data;
  String msg;

  HTHBean({this.code, this.data, this.msg});

  HTHBean.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    data['msg'] = this.msg;
    return data;
  }
}

class Data {
  int pages;
  List<HTHQY> records;
  int total;

  Data({this.pages, this.records, this.total});

  Data.fromJson(Map<String, dynamic> json) {
    pages = json['pages'];
    if (json['records'] != null) {
      records = new List<HTHQY>();
      json['records'].forEach((v) {
        records.add(new HTHQY.fromJson(v));
      });
    }
    total = json['total'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['pages'] = this.pages;
    if (this.records != null) {
      data['records'] = this.records.map((v) => v.toJson()).toList();
    }
    data['total'] = this.total;
    return data;
  }
}

class HTHQY {
  String projectName; //合同名称
  String contractCode; //合同编号  验收用到
  var contractAmount; //合同金额
  String customerName; //客户名称  验收用到
  bool isSel;

  HTHQY({
    this.projectName,
    this.contractCode,
    this.contractAmount,
    this.customerName,
  });

  HTHQY.fromJson(Map<String, dynamic> json) {
    projectName = json['projectName'];
    contractCode = json['contractCode'];
    contractAmount =
        json['contractAmount'] == null ? 0 : json['contractAmount'];
    customerName = json['customerName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['projectName'] = this.projectName;
    data['contractCode'] = this.contractCode;
    data['contractAmount'] = this.contractAmount;
    data['customerName'] = this.customerName;
    return data;
  }
}
